package bd403.Backend;

import java.util.ArrayList;

import android.content.Context;
import bd403.namespace.R;

/* Application class that manages the help system. Contains a list of frequently
 * asked questions and their responses. Also assists in storing some information for the UI.
 * Main authors: Brendan & Cody
 */

public class Help {
	private ArrayList<String> topics;
	private ArrayList<String> answers;
	private int current;
	
	public Help(Context context) {
		topics = new ArrayList<String>();
		answers = new ArrayList<String>();
		
		topics.add(context.getString(R.string.help_topic1));
		topics.add(context.getString(R.string.help_topic2));
		topics.add(context.getString(R.string.help_topic3));
		topics.add(context.getString(R.string.help_topic4));
		
		answers.add(context.getString(R.string.help_answer1));
		answers.add(context.getString(R.string.help_answer2));
		answers.add(context.getString(R.string.help_answer3));
		answers.add(context.getString(R.string.help_answer4));
	}
	
	/* Returns an ArrayList<String> of topics for the help page.
	 */
	public ArrayList<String> getTopics() {
		return topics;
	}
	
	/* Returns a String representing an answer to display on the help page.
	 */
	public String getAnswer() {
		return answers.get(current);
	}
	
	/* Returns a String representing a topic to display on the help page.
	 */
	public String getTopic(){
		return topics.get(current);
	}
	
	/* Sets the current topic to be displayed.
	 */
	public void setCurrent(int i) {
		current = i;
	}
}
